<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue初探-应用与根组件</title>
    <link rel="stylesheet" href="common.css">
    <script type="importmap">
        {
            "imports":{
                "vue":"http://lib.baomitu.com/vue/latest/vue.esm-browser.js"
            }
        }
    </script>
</head>
<body>
    <div id="app1">
        <p>{{message}}</p>
    </div>

    <div id="app2">
        <p>{{message}}</p>
    </div>
    <script type="module">
        import {createApp} from "vue";
        const root1={
            data() {
                return {
                    message:"app1-跟组件，应用实例挂载到指定容器",
                }
            },
        }
        const app1=createApp(root1);
        app1.mount("#app1");
        
        const root2={
            data() {
                return {
                    message:"app2-跟组件，应用实例挂载到指定容器",
                }
            },
        }
        const app2=createApp(root2);
        app2.mount("#app2");
    </script>
</body>
</html>